<?php
if($_GET['mode']=="delete"){
   $delete_art = mysql_query('DELETE FROM user_articles WHERE article_id='.$_GET['id'].'');
   echo '<meta http-equiv="refresh" content="0;url=check.php?mode=articles">';
}
if($_POST['hide1']!=57) echo "";
	else {
	   $article_name = $_POST['article_name'];
	   $article_descr = $_POST['article_descr'];
	   $content = $_POST['content'];
	   $date_added = $_POST['date_added'];
	   $place = $_POST['place'];
	   $tutorial = $_POST['tutorial'];
	   $from_who = $_POST['from_who'];
	   
	   $insert = mysql_query('INSERT INTO articles(article_name, article_descr, content, date_added, place, from_who, to_tutorial)
	   VALUES("'.$article_name.'", "'.$article_descr.'", '.$content.', '.$date_added.', "'.$place.'", "'.$from_who.'", "'.$tutorial.'")');
	  
	   $delete=mysql_query('DELETE FROM user_articles WHERE article_name="'.$article_name.'"');
	   echo '<meta http-equiv="refresh" content="0;url=check.php?mode=articles">';
	}
?>